package com.example.shoppingmall.service;

import com.example.shoppingmall.dao.WithdrawalMapper;
import com.example.shoppingmall.pojo.Examine;
import com.example.shoppingmall.pojo.Withdrawal;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class WithdrawalService {

    @Autowired
    WithdrawalMapper withdrawalMapper;

    //多条件查询+分页
    public List<Withdrawal> getWithd(String userPhone, Integer ex_id, Integer pageNo, Integer pageNum){
        return withdrawalMapper.getWithd(userPhone,ex_id,pageNo,pageNum);
    }

    //查询总条数
    public int total(String userPhone,Integer ex_id){
        return withdrawalMapper.total(userPhone,ex_id);
    }

    //修改
    public int update(Withdrawal withdrawal){
        return withdrawalMapper.update(withdrawal);
    }

    //查询审核List
    public List<Examine> exList(){
        return withdrawalMapper.exList();
    }

    //查询详情
    public Withdrawal getWithdrawal(Integer id){
        return withdrawalMapper.getWithdrawal(id);
    }

}
